﻿
using Outdoor.BaseEntity;
using Grishko.SerilizeTools;
using OutdoorLib.Context;
using OutdoorLib.BaseEntity.WS;

using OutdoorLib.BaseEntity.Agency;


namespace OutdoorLib.BaseEntity
{
    /// <summary>
    /// Бизнесс объекты с движком бизнесс логики поставляемым агентсовм
    /// </summary>
    public class BusinessRulesEntity : SqlAgencyEntity
    {

        //BusinesRulesEngine _BRE = null;
        [EntityNonSerialized ]
        public virtual  BusinesRulesEngine BusinesRulesEngine
        {
            get            
            {
                //if (null == _BRE)
                //{
                //    //wsBusinesEngine ws = (wsBusinesEngine)AgencyLib_GlobalConstants.CurrentAgency.WS_FactoryList[WS_FactoryList.wsKey_BusinesEngine];
                //    //_BRE=ws.GetBusinesRulesEngine(this);
                //}
                return null;
                    

            }
            //set 
            //{
            //    if (HttpContext.Current.Session != null)
            //    {
            //        Agency a = AgencyLib_GlobalConstants._getAgency();
            //        a.SetBusinesRulesEngine(this, ref _BRE);
            //    }
            //    _BRE = value;
            //}
            

        }

    }
}
